clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/survey_clean.dta, clear

** Run the analyses
* Physical sanctions
regr intent_phis_vox_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_physical

* Verbal sanctions
regr intent_verb_vox_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_verbal

* Insult sanctions
regr intent_insult_vox_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_insult

* Direct sanctions (PCA)
regr pca_direct right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_direct

* Deny help
regr intent_deny_vox_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_deny

* Avoid interaction
regr intent_avoid_vox_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_avoid

* Gossip
regr intent_gossip_vox_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_gossip

* Indirect sanctions (PCA)
regr pca_indirect right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_indirect

* Make table
esttab vote_physical vote_verbal vote_insult vote_direct vote_deny vote_avoid vote_gossip vote_indirect   ///
using tables/tableb14.tex, tex nonumber ///
mtitles("Physical" "Verbal" "Insult" "Direct sanctions (PCA)" "Deny help" "Avoid interaction" "Gossip" "Indirect sanctions (PCA)" ) ///
coeflabels(right_minus_left_ccaa "Difference between right and left vote share in region" ///
female_dummy "Female (dummy)" age_calculated "Age" college "College" spanish "Spanish" _cons "Constant") se ///
replace addnotes("Standard errors are robust")
